<template>
	<view class="launch">
		<view class="launch__loading">
			<view class="launch__loading-icon"></view>
			<view class="launch__loading-text">应用启动中...</view>
		</view>
	</view>
</template>

<script>
	import { mapGetters } from 'vuex'
  import { updateTabBarLanguage } from '@/utils/tabbar-i18n.js'

	export default {
		data() {
			return {

			}
		},
		computed: {
			...mapGetters([
				'isLogin'
			])
		},
    onLoad () {
      if (this.isLogin) {
        uni.reLaunch({
          url: '/pages/home/home'
        })
        updateTabBarLanguage()
      } else {
        uni.redirectTo({
          url: '/pages/login/login'
        })
      }
    }
	}
</script>

<style lang="less">
.launch{
  margin-top: 50rpx;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
.launch__loading-text{
	color: #999;
}
</style>
